#ifndef GENOMEFACTORY_H
#define GENOMEFACTORY_H

#include <QObject>
#include <QString>
#include <QDebug>
#include <QFile>
#include <QPointer>
#include <QTextStream>
#include <QHash>
#include <QStringList>
#include <QMutex>

#include "contig.h"
#include "bacterialcontigbrowser.h"

class GenomeFactory : public QObject
{
    Q_OBJECT
public:
    explicit GenomeFactory(QString pathToFile, QList < QPointer< Contig > >* c, BacterialContigBrowser* parentWidget, QObject *parent = 0);
    
signals:
    void trackProgress(int stepsComplete);
    void finished();
    void error( QString err );

    void gotContigs( QList < QPointer< Contig > >* );

    void createContig( );

public slots:
    void process();

private:
    bool readReformatedFile();
    bool readReformatedFile2();


    QString pathToFile;
    BacterialContigBrowser* parentWidget;
    QList < QPointer< Contig > >* contigs;  //right now this stores QGraphicsWidgets- contigs
                                //I think I might eventually make a class called' visBaseElement'
                                    //which would store the subelements that make up a visWidget
                                    //but I'm not sure ...
    QMutex mutex;
};

#endif // GENOMEFACTORY_H
